package kr.hkit.androidcomplete01.ch05;

import kr.hkit.androidcomplete01.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

public class FrameLayout extends Activity {
	ImageView img;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.ch05_framelayout);
		
		Button btn = (Button) findViewById(R.id.btnframelayout);
		img = (ImageView) findViewById(R.id.imageView1);
		
		btn.setOnClickListener(new Button.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				if(img.getVisibility()==View.VISIBLE){
					img.setVisibility(View.INVISIBLE);
				}else{
					img.setVisibility(View.VISIBLE);
				}
				
			}
		});
	}
}
